﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TXTD.Admin.Data.Entitys.System;
using TXTD.Admin.Model.Modules.System;
using TXTD.Admin.Model.Paging;

namespace TXTD.Admin.Interface.System
{
    public interface ISysRoleService : IBaseService<SysRole>
    {
        /// <summary>
        /// 获取所有角色信息
        /// </summary>
        /// <returns></returns>
        List<SysRole> GetAllList();
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <returns></returns>
        PageResult<SysRole> GetPageList(SysRole user);
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Add(SysRole model);
        /// <summary>
        /// 修改数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Update(SysRole model);
        /// <summary>
        /// 删除数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteById(string id);
        /// <summary>
        /// 修改启用状态
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int UpdateEnabled(SysRole model);

        /// <summary>
        /// 根据角色id获取角色菜单
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<string> GetRoleMenuByRoleId(string roleId);
        /// <summary>
        /// 保存角色菜单
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="menuIds"></param>
        int SaveRoleMenu(RoleMenuModel roleMenuModel);
    }
}
